Skip to content

Conversation

@renovate
Copy link
Contributor

@renovate renovate bot commented Dec 28, 2024

This PR contains the following updates:

Package Change Age Adoption Passing Confidence
Moq 4.13.0 -> 4.20.72 age adoption passing confidence

Release Notes

moq/moq (Moq)

v4.20.72

Full Changelog

🔨 Other:

  • Question: Sponsorable Attribute in release v4.20.71 #​1513

🔀 Merged:

v4.20.71

Full Changelog

🐛 Fixed bugs:

  • (To delete) #​1497
  • Documentation link gives 404 #​1495
  • mock.Protected().Verify() does not work correctly #​1493
  • Documentation link is broken #​1487
  • Moq library throwing TypeIniatilizationException. #​1459

🔨 Other:

  • Documentation Unavailable Online #​1473
  • Supporting .NET8 #​1462
  • Some source code files is filled with comments like: "Unmerged change from project " #​1451
  • Question: would it make sense to call verify all on a strict mock when the mock gets disposed? #​1440
  • SponsorLink Integration Makes Moq Unuasable due to PII and GDPR Requirements #​1433
  • Default value ILookup<> in loose mode is null #​1391
  • Verifying a protected method when the exact parameter types are not statically known #​1339

🔀 Merged:

v4.20.70

Full Changelog

🔨 Other:

  • a minor changes to improve the readability #​1419
  • Poll on SponsorLink #​1415
  • Change log is not updated since version 4.18.4 #​1406
  • Stop using Moq as a guinea pig to get feedback on and develop SponsorLink #​1396
  • Permanently delete all data from SponsorLink's database that has been collected during builds that included Moq (notably any version 4.20.*) #​1395
  • SponsorLink is now OSS too and no longer bundled #​1384
  • SponsorLink and supporting OSS more broadly #​1374
  • Performance issue with large interfaces #​1350

🔀 Merged:

v4.20.69

v4.20.2

🐛 Fixed bugs

NOTE: in addition, there were potential privacy issues raised with regards to the SHA256 hashing of
user' email to check for sponsorship, so it won't be coming back until that's properly addressed

v4.20.1

✨ Implemented enhancements
  • Add Sponsor button to package readme 💜

v4.20.0

✨ Implemented enhancements
  • Mock<T>.RaiseAsync method for raising "async" events, i.e. events that use a Func<..., Task> or Func<..., ValueTask> delegate. (@​stakx, #​1313)
  • setup.Verifiable(Times times, [string failMessage]) method to specify the expected number of calls upfront. mock.Verify[All] can then be used to check whether the setup was called that many times. The upper bound (maximum allowed number of calls) will be checked right away, i.e. whenever a setup gets called. (@​stakx, #​1319)
🔨 Other
Fixed

v4.18.4

Full Changelog

✨ Implemented enhancements:

  • Improve a exception message for extension methods. #​1305
  • Mocking a method that takes an in parameter #​1301

🐛 Fixed bugs:

  • .NET Hot Reload breaks mocked interfaces and throws IndexOutOfRangeException #​1252

🔨 Other:

  • Ignoring latest setup #​1311
  • Invocation count incorrect. Argument object is stored as reference and is changed incorrectly #​1309
  • Moq 4.18.3 Release still pending #​1302
  • Moq fails when a method with input parameter of type Expression<Func<T,bool>> is called #​1288
  • Use Moq as a proxy #​1287
  • TargetParameterCountException when using event Raise with Moq #​1285
  • Add CITATION.cff file #​1266
  • MissingMethodException when using new C# language features (in parameters, init-only setters, etc.) with generic methods, or with members in generic types #​1148

🔀 Merged:

v4.18.3

Fixed

v4.18.2

Changed
  • Update package reference to Castle.Core (DynamicProxy) from version 5.0.0 to 5.1.0 (@​stakx, #​1275)
  • Removed dependency on System.Threading.Tasks.Extensions for netstandard2.1 and net6.0 (@​tibel, #​1274)
Fixed
  • "Expression is not an event add" when using .Raises() with redeclared event (@​howcheng, #​1175)
  • MissingMethodException when mocking interface with sealed default implementation (@​pjquirk, #​1209)
  • Throws TypeLoadException on mock when a record has a base record on .NET 6 (@​tgrieger-sf, #​1273)

v4.18.1

Full Changelog

✨ Implemented enhancements:

  • [Feature Request] Allow to change MockBehavior of mocks #​1230
  • Make Capture.In<>() support System.Collections.Generic.Queue<>() #​1198

🐛 Fixed bugs:

  • Difference in behavior when mocking async method using .Result vs without #​1253
  • Setup property doesn't work as expected #​1248
  • Update from 4.13.1 to 4.16.1 lazy evaluation setups fail #​1217

🔨 Other:

  • Absence of a clause in the documentation about the lack of support for sealed methods #​1256
  • moqthis.com is down #​1244
  • Setup return value fails in a constellation with nullable ints #​1223

🔀 Merged:

v4.18.0

Full Changelog

🐛 Fixed bugs:

  • Failure when invoking a method with by-ref parameter & mockable return type on a mock with CallBase and DefaultValue.Mock configured #​1249
  • Placeholder in exception is not filled out #​1246

🔨 Other:

  • sealed method mock calls actual method instead of mocked #​1255
  • Unable to call base interface getter with cast without explicit setup. #​1254
  • Moq is using Castle.Core which has an old version of System.Net.Http which is vulnerable to "DoS", "Spoofing", "Privilege Escalation", "Authentication Bypass" and "Information Exposure" #​1219
  • Can't set up "private protected" properties #​1170

🔀 Merged:

v4.17.2

Full Changelog

🐛 Fixed bugs:

  • Property stubs not working on sub mock #​1240

🔨 Other:

  • Add support for success condition parameter in When. #​1237

🔀 Merged:

v4.17.1

Full Changelog

🐛 Fixed bugs:

  • SetupAllProperties causes mocks to become race-prone #​1231
  • Property setups are ignored on mocks instantiated using Mock.Of #​1066

🔨 Other:

  • It.IsSubtype<T> doesn't work when T has constraints #​1215

🔀 Merged:

v4.16.1

Full Changelog

✨ Implemented enhancements:

  • Improve error message when verification fails #​1138
  • Add .NET Standard 2.1 #​1041
  • Support for Mock.Of<T> with not default constructor #​963
  • Setup does not throw NotSupportedException when setting up sealed method seen through an interface #​453

🐛 Fixed bugs:

  • Property indexers raises ' System.Reflection.AmbiguousMatchException: Ambiguous match found.' exception. #​1129

🔨 Other:

  • Callback validation too strict when setting up a task's .Result property #​1132
  • Performance with large interfaces #​1128
  • Interface Default methods are ignored #​972

🔀 Merged:

v4.16.0

Full Changelog

✨ Implemented enhancements:

  • Return matched invocation from Verify #​1117
  • TypeNotMockable Exception #​1112
  • Easier async setups through a new Await(...) operator #​1007
  • Add ability to set up the .Result of (value) tasks #​1126 (@​stakx)

🐛 Fixed bugs:

  • System.InvalidOperationException because of call to Verifiable in MockSequence after 4.14.0 #​1114

🔨 Other:

  • Please document generic argument matching support for versions prior to 4.13 #​1119
  • Verify is not capturing a classes state at the time of invocation. #​1118
  • Adding a setup looks like it became an O(n*n) operation since #​984 was merged #​1110
  • DbSet mocking is broken #​1091

🔀 Merged:

v4.15.2

Full Changelog

🔨 Other:

  • moq is not compatible with System.Threading.Tasks.Extensions 4.5.3 or 4.5.4 #​1107
  • Hi There, I just updated Moq package from version 4.14.7 to version 4.15.1 and noticed that it broke Unit Tests for my projects. Kindly look into this matter. Thanks in advance, Regards, Asheesh Agrawal #​1103
  • VerifyNoOtherCalls is failing a lot for existing tests due to unverified event registrations #​1102

🔀 Merged:

v4.14.7

Full Changelog

✨ Implemented enhancements:

  • New It.Is overload for matching values using custom IEqualityComparer #​1059
  • Feature request: Promote Invocation.ReturnValue to IInvocation #​920

🐛 Fixed bugs:

  • Verify() fails on items not explicitely marked a Verifiable() #​1073
  • Mock.Of of Excel interop classes fails to initialize #​1072
  • Setters on deep mocks no longer work after updating to 4.14.6 from old version #​1071
  • Callback not raised in mocked subclass #​1067

🔨 Other:

  • Unable to chain ReturnsAsync with Verifiable #​1057
  • mocked.Equals(mocked) returns false by default if mocked class overrides Equals #​802

v4.14.6

Full Changelog

🐛 Fixed bugs:

  • Mock.Of<T>((m) => ...) doesn't play well with Microsoft IOptions<T> #​1039

🔨 Other:

  • Unable to build Moq: "The Microsoft.Build.Tasks.Git.LocateRepository task failed unexpectedly." #​1060
  • [Feature request] Loose mode for commands and strict for queries. #​1056
  • ThrowsAnyAsync<> not validating type #​1050
  • Mock methods that take or return a Span<T> #​1049
  • Feature request: enable verification of extension-methods calls #​1045

🔀 Merged:

v4.14.5

Fixed
  • Regression since version 4.11.0: VerifySet fails with NullReferenceException for write-only indexers (@​Epicycle23, #​1036)

v4.14.4

Full Changelog

🐛 Fixed bugs:

  • NullReferenceException on subsequent setup if expression contains null reference #​1031

🔨 Other:

  • Do we still need to use DynamicProxy's AttributesToAvoidReplicating? #​1026

🔀 Merged:

v4.14.3

Full Changelog

🐛 Fixed bugs:

  • Verify behavior change using DefaultValue.Mock 4.12.0 vs 4.13.0 #​1024

🔀 Merged:

v4.14.2

Full Changelog

🔨 Other:

  • API Documentation page broken. #​1023
  • System.IO.FileNotFoundException thrown when referencing same DLL name with 2 different assembly versions within a single application #​1019

🔀 Merged:

  • DefaultValue.Mock should not add redundant setups for already-matched invocations #​1025 (@​stakx)

v4.14.1

Full Changelog

✨ Implemented enhancements:

  • ISetupSequentialResult doesn't support Pass for async void methods. #​993

🐛 Fixed bugs:

  • StackOverflowException on VerifyAll when mocked method returns mocked object #​1012

🔨 Other:

  • Function match should catch exception? #​1010
  • NullReferenceException in IMatcher.Matches #​1005
  • Async Method Support Clean-up #​384

🔀 Merged:

v4.14.0

Full Changelog

✨ Implemented enhancements:

  • Expose Moq.Times' Verify and Kind #​970
  • After updating moq from 4.10.1 to 4.11, mocking nhibernate session throws a System.NullReferenceException. #​955
  • Callback and Returns: Allow callback parameters to have type object where a type matcher was used #​953
  • Expose Mock.Setups, part 4: Mock, fluent setup & inner mock discovery #​989 (@​stakx)
  • add support for mocking protected generic methods #​967 (@​JmlSaul)

🐛 Fixed bugs:

  • Capture.In during Verify stopped working when upgrading Moq from 4.10.1 to 4.13.1 #​968

🔨 Other:

  • Build fails with error CS8751: Internal error in the C# compiler #​994
  • Call times verification change from 4.11.0 #​990
  • Mocked method call with multiple specific parameter call returns null #​973
  • IDE0008 Use explicit type instead of 'var' #​971
  • Maintainer on vacation until mid-March 2020 #​966
  • System.NullReferenceException : Object reference not set to an instance of an object. #​965
  • How do you mock an IAsyncEnumerable<T> ? #​962
  • Update from 4.9.0 to upper version breaks Setup out-param method #​960
  • If When(Func<bool> condition) is used to setup a mock, the setup verification is skipped. #​959

🔀 Merged:

v4.13.1

Full Changelog

🐛 Fixed bugs:

  • mock.SetupProperty throws NullReferenceException when called for partially overridden property #​951
  • Recursive mocks with different paths #​946
  • Original mocked type not included after downcasting and Get #​943
  • System.ArgumentException: Interface not found in v.4.13.0 but not before. #​942
  • Regression in 4.13.0 #​932
  • SetupAllProperties does not recognize property as read-write if only setter is overridden #​886
  • AmbiguousMatchException when setting up the property, that hides another one #​939 (@​ishatalkin)

🔨 Other:

  • Test method throw exeption Castle.DynamicProxy.ProxyGenerationException #​941
  • Controller Mock return null for ActionResult other return types like int working fine #​936
  • Method not found: 'Void Castle.DynamicProxy.ProxyGenerationOptions.AddDelegateTypeMixin(System.Type)'.. #​935
  • Ability to evaluate "verify" after a certain period of time #​931
  • Problem when mocking an interface with hidden property of different type #​930
  • VerifyAll() setup for mock that no method was called #​929
  • Issue while calling Setup (mocked) method which is called from a method that is in Task Factory c# #​927
  • Quickstart guide add callback which sets mock setup property #​926
  • Can not instantiate proxy of class #​924
  • Getting value of property through read-only interface returns default #​923
  • 4.13 callback with returns and out parameter ~ bug? #​917

🔀 Merged:

  • Fix SetupProperty for partially overridden properties #​952 (@​stakx)
  • Ensure SetupAllProperties stubs all accessors of partially overridden properties #​950 (@​stakx)
  • Let InnerMockSetup (i.e. internal setups for cached return values) match generic args exactly instead of by assignment compatibility. #​949 (@​stakx)
  • Match params arrays in setup/verification expressions using structural equality #​948 (@​stakx)
  • Enable mock.As<> round-tripping #​945 (@​stakx)
  • Use correct proxy type in InterfaceProxy #​944 (@​stakx)

Configuration

📅 Schedule: Branch creation - At any time (no schedule defined), Automerge - At any time (no schedule defined).

🚦 Automerge: Disabled by config. Please merge this manually once you are satisfied.

Rebasing: Whenever PR becomes conflicted, or you tick the rebase/retry checkbox.

🔕 Ignore: Close this PR and you won't be reminded about this update again.


  • If you want to rebase/retry this PR, check this box

This PR was generated by Mend Renovate. View the repository job log.

@renovate renovate bot added C-dotnet .NET Bindings B-dependencies Pull requests that update a dependency file labels Dec 28, 2024
@diemol diemol requested a review from nvborisenko December 28, 2024 19:15
@renovate
Copy link
Contributor Author

renovate bot commented Dec 28, 2024

Renovate Ignore Notification

Because you closed this PR without merging, Renovate will ignore this update (4.20.72). You will get a PR once a newer version is released. To ignore this dependency forever, add it to the ignoreDeps array of your Renovate config.

If you accidentally closed this PR, or if you changed your mind: rename this PR to get a fresh replacement PR.

@renovate renovate bot deleted the renovate/moq-4.x branch December 28, 2024 20:14
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

B-dependencies Pull requests that update a dependency file C-dotnet .NET Bindings

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants